package com.party.admin.utils.excel;

/**
 * Created by wei.li
 *
 * @date 2017/7/26 0026
 * @time 15:14
 */
public enum  ExelClolerType {

    WHITE("white", (short) 0),

    BLUE("blue", (short)12),

    DARK_BLUE("darkblue", (short)18),

    GREEN("green", (short)17),

    ORANGE("orange", (short)53),

    PURPLE("purple", (short)20),

    PINK("pink", (short)14),

    RED("red", (short)10),

    GRAY("gray", (short)55),

    BROWN("brown", (short)51);

    private String value;

    private short index;

    ExelClolerType(String value, short index) {
        this.value = value;
        this.index = index;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public short getIndex() {
        return index;
    }

    public void setIndex(short index) {
        this.index = index;
    }

    public static short getIndex(String value){

        for (ExelClolerType excelClolerType : ExelClolerType.values()){
            if (value.equals(excelClolerType.getValue())){
                return excelClolerType.getIndex();
            }
        }
        return 0;
    }
}
